package com.itheima.health.security;

import org.springframework.security.crypto.password.PasswordEncoder;

/**
 * @author by Dragon
 * @Classname JokerPasswordEncoder
 * @Description TODO
 * @Date 2020/2/22 19:29
 * @Version 1.0
 */
public class JokerPasswordEncoder implements PasswordEncoder {
    @Override
    public String encode(CharSequence rawPassword) {
        return rawPassword + "假装加密了";
    }

    @Override
    public boolean matches(CharSequence rawPassword, String encodedPassword) {
        return encode(rawPassword).equals(encodedPassword);
    }
}
